/**
 * @Author：ming
 * @Date：2023/10/8 5:30 AM
 * @Filename：Lc
 */

/**
 * @author ming
 */
public class Lc45 {
    public int jump(int[] nums) {

        int len = nums.length;
        boolean[] dp = new boolean[len];
        dp[len-1]=true;
        for (int i = len-2; i >=0 ; i--) {
            for (int j = i+1; j < len; j++) {
                if(nums[i]>=(j-i)&&dp[j]){
                    dp[i] =true;
                    break;
                }
            }
        }

        return 0;
    }
}
